package com.hainatong.shiphelper.module.OAmgr.fragment;


import android.os.Bundle;
import android.view.View;
import com.blankj.utilcode.util.ObjectUtils;
import com.blankj.utilcode.util.StringUtils;
import com.hainatong.shiphelper.MvvmLazyFragment;
import com.hainatong.shiphelper.R;
import com.hainatong.shiphelper.databinding.FragmentOamgrApplyResultBinding;
import com.hainatong.shiphelper.mainhome.entity.MsgBean;
import com.hainatong.shiphelper.utils.GsonUtil;
import com.hainatong.mvvmbase.base.NoViewModel;

public class OAApplyResultFragment extends MvvmLazyFragment<FragmentOamgrApplyResultBinding, NoViewModel>
{
    private static String OA_APPLY_RESULT_TAG = "OAApplyResultFragment";

    private MsgBean applyMsg;

    public static OAApplyResultFragment newInstance(String typeCode)
    {
        Bundle bundle = new Bundle();
        bundle.putString( OA_APPLY_RESULT_TAG , typeCode );
        OAApplyResultFragment applyFragment = new OAApplyResultFragment();
        applyFragment.setArguments( bundle );
        return applyFragment;
    }


    @Override
    protected void initParameters()
    {
        Bundle args = getArguments();
        String type = "";
        if(  args != null )
        {
            type = args.getString(OA_APPLY_RESULT_TAG , "");
        }

        if( !StringUtils.isEmpty( type ))
        {
            applyMsg = GsonUtil.json2Obj( type, MsgBean.class );
        }
    }


    @Override
    public int getLayoutId()
    {
        return R.layout.fragment_oamgr_apply_result;
    }

    @Override
    public int getBindingVariable() {
        return 0;
    }

    @Override
    protected void onRetryBtnClick() {

    }

    @Override
    protected void initView(View view)
    {
        if(ObjectUtils.isNotEmpty( applyMsg ))
        {


        }
    }
}
